package com.spark.invoicings.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 采购订单表
 * 
 * @author sunyan
 * @email sunyan@gmail.com
 * @date 2024-06-13 11:10:43
 */
@Data
@TableName("t_purchase_order")
public class Order implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 采购订单id
	 */
	@TableId(type = IdType.AUTO)
	private Integer purchaseOrderId;
	/**
	 * 采购状态（1.审批中，2.已驳回，3.待入库，4.部分入库，5.已全部入库，6.已撤销）
	 */
	private Integer procurementStatusId;
	/**
	 * 采购单号
	 */
	private String purchaseOrderNumber;
	/**
	 * 供应商id
	 */
	private Integer supplierId;
	/**
	 * 预计到货日期
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date expectedArrivalDate;
	/**
	 * 实际到货日期
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date actualArrivalDate;
	/**
	 * 延期状态（正常，延期）
	 */
	private Integer abnormalStateId;
	/**
	 * 备注
	 */
	private String remark;
	/**
	 * 采购申请人
	 */
	private String purchaseApplicant;
	/**
	 * 采购申请日期
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date purchaseApplicationDate;
	/**
	 * 订单通过日期
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date orderPassDate;
	/**
	 * 采购总数
	 */
	private Integer totalQuantity;
	/**
	 * 未入库数量
	 */
	private Integer unstockedQuantity;
	/**
	 * 已入库数量
	 */
	private Integer stockedQuantity;
	/**
	 * 采购总额
	 */
	private double totalAmount;
	/**
	 * 待付款金额
	 */
	private double pendingPaymentAmount;
	/**
	 * 已付款金额
	 */
	private double paidAmount;
	/**
	 * 待回票金额
	 */
	private double pendingReceiptAmount;
	/**
	 * 已回票金额
	 */
	private double receivedAmount;
	/**
	 * 流程发起人
	 */
	private String processInitiator;
	/**
	 * 流程状态
	 */
	private String processStatus;
	/**
	 * 流程进展
	 */
	private String processProgress;
	/**
	 * 流程启动时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date processStartTime;
	/**
	 * 流程结束时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date processEndTime;
	/**
	 * 创建人
	 */
	private String creator;
	/**
	 * 修改人
	 */
	private String modifier;
	/**
	 * 审批人
	 * */
	private String approver;
	/**
	 * 审批时间
	 * */
	private String approvalTime;
	/**
	 * 创建时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	/**
	 * 修改时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date modifyTime;
	/**
	 * 最后活动时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date lastActivityTime;

	/**
	 * 组合一个 DictData 对象作为自己的属性
	 */
	@TableField(exist = false)
	private DictData dictData;

	/**
	 * 组合一个 ProcuredSupplier 对象作为自己的属性
	 */
	@TableField(exist = false)
	private ProcuredSupplier supplier;

	/**
	 * 组合一个List<PurchaseDetail>集合来作为自己的属性
	 */
	@TableField(exist = false)
	private List<PurchaseDetail> purchaseDetails;

	public List<PurchaseDetail> getPurchaseDetails() {
		return purchaseDetails;
	}

	public String getApprover() {
		return approver;
	}

	public void setApprover(String approver) {
		this.approver = approver;
	}

	public String getApprovalTime() {
		return approvalTime;
	}

	public void setApprovalTime(String approvalTime) {
		this.approvalTime = approvalTime;
	}

	public void setPurchaseDetails(List<PurchaseDetail> purchaseDetails) {
		this.purchaseDetails = purchaseDetails;
	}

	public Integer getPurchaseOrderId() {
		return purchaseOrderId;
	}

	public void setPurchaseOrderId(Integer purchaseOrderId) {
		this.purchaseOrderId = purchaseOrderId;
	}

	public Integer getProcurementStatusId() {
		return procurementStatusId;
	}

	public void setProcurementStatusId(Integer procurementStatusId) {
		this.procurementStatusId = procurementStatusId;
	}

	public String getPurchaseOrderNumber() {
		return purchaseOrderNumber;
	}

	public void setPurchaseOrderNumber(String purchaseOrderNumber) {
		this.purchaseOrderNumber = purchaseOrderNumber;
	}

	public Integer getSupplierId() {
		return supplierId;
	}

	public void setSupplierId(Integer supplierId) {
		this.supplierId = supplierId;
	}

	public Date getExpectedArrivalDate() {
		return expectedArrivalDate;
	}

	public void setExpectedArrivalDate(Date expectedArrivalDate) {
		this.expectedArrivalDate = expectedArrivalDate;
	}

	public Date getActualArrivalDate() {
		return actualArrivalDate;
	}

	public void setActualArrivalDate(Date actualArrivalDate) {
		this.actualArrivalDate = actualArrivalDate;
	}

	public Integer getAbnormalStateId() {
		return abnormalStateId;
	}

	public void setAbnormalStateId(Integer abnormalStateId) {
		this.abnormalStateId = abnormalStateId;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getPurchaseApplicant() {
		return purchaseApplicant;
	}

	public void setPurchaseApplicant(String purchaseApplicant) {
		this.purchaseApplicant = purchaseApplicant;
	}

	public Date getPurchaseApplicationDate() {
		return purchaseApplicationDate;
	}

	public void setPurchaseApplicationDate(Date purchaseApplicationDate) {
		this.purchaseApplicationDate = purchaseApplicationDate;
	}

	public Date getOrderPassDate() {
		return orderPassDate;
	}

	public void setOrderPassDate(Date orderPassDate) {
		this.orderPassDate = orderPassDate;
	}

	public Integer getTotalQuantity() {
		return totalQuantity;
	}

	public void setTotalQuantity(Integer totalQuantity) {
		this.totalQuantity = totalQuantity;
	}

	public Integer getUnstockedQuantity() {
		return unstockedQuantity;
	}

	public void setUnstockedQuantity(Integer unstockedQuantity) {
		this.unstockedQuantity = unstockedQuantity;
	}

	public Integer getStockedQuantity() {
		return stockedQuantity;
	}

	public void setStockedQuantity(Integer stockedQuantity) {
		this.stockedQuantity = stockedQuantity;
	}

	public double getTotalAmount() {
		return totalAmount;
	}

	public void setTotalAmount(double totalAmount) {
		this.totalAmount = totalAmount;
	}

	public double getPendingPaymentAmount() {
		return pendingPaymentAmount;
	}

	public void setPendingPaymentAmount(double pendingPaymentAmount) {
		this.pendingPaymentAmount = pendingPaymentAmount;
	}

	public double getPaidAmount() {
		return paidAmount;
	}

	public void setPaidAmount(double paidAmount) {
		this.paidAmount = paidAmount;
	}

	public double getPendingReceiptAmount() {
		return pendingReceiptAmount;
	}

	public void setPendingReceiptAmount(double pendingReceiptAmount) {
		this.pendingReceiptAmount = pendingReceiptAmount;
	}

	public double getReceivedAmount() {
		return receivedAmount;
	}

	public void setReceivedAmount(double receivedAmount) {
		this.receivedAmount = receivedAmount;
	}

	public String getProcessInitiator() {
		return processInitiator;
	}

	public void setProcessInitiator(String processInitiator) {
		this.processInitiator = processInitiator;
	}

	public String getProcessStatus() {
		return processStatus;
	}

	public void setProcessStatus(String processStatus) {
		this.processStatus = processStatus;
	}

	public String getProcessProgress() {
		return processProgress;
	}

	public void setProcessProgress(String processProgress) {
		this.processProgress = processProgress;
	}

	public Date getProcessStartTime() {
		return processStartTime;
	}

	public void setProcessStartTime(Date processStartTime) {
		this.processStartTime = processStartTime;
	}

	public Date getProcessEndTime() {
		return processEndTime;
	}

	public void setProcessEndTime(Date processEndTime) {
		this.processEndTime = processEndTime;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String getModifier() {
		return modifier;
	}

	public void setModifier(String modifier) {
		this.modifier = modifier;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public Date getLastActivityTime() {
		return lastActivityTime;
	}

	public void setLastActivityTime(Date lastActivityTime) {
		this.lastActivityTime = lastActivityTime;
	}

	public DictData getDictData() {
		return dictData;
	}

	public void setDictData(DictData dictData) {
		this.dictData = dictData;
	}

	public ProcuredSupplier getSupplier() {
		return supplier;
	}

	public void setSupplier(ProcuredSupplier supplier) {
		this.supplier = supplier;
	}
}
